//
//  WechatDelegate.swift
//  YunshuApp
//
//  Created by 周文杰 on 2017/6/1.
//  Copyright © 2017年 zwj. All rights reserved.
//

import UIKit

class WechatDelegate: NSObject , WXApiDelegate {

    // MARK: -微信分享
    func onReq(_ req: BaseReq!) {
        
        print(#function)
        
    }
    
    func onResp(_ resp: BaseResp!) {
        
        print(#function)
        
        guard !resp.isKind(of: SendMessageToWXReq.self) else {
            
            return
            
        }
        
        if resp.errCode == WXSuccess.rawValue {
            
            print("分享成功")
            
        } else {
            
            print("分享失败")
            
            print(resp.errCode)
            
        }
        
    }
    
}
